<div class="dux-tools">
  <div class="bread-head">{$class_info.name}管理 <span class="small"></span> </div>
  <br>
  <div class="tools-function clearfix">
    <div class="float-left"> <a class="button button-small bg-main icon-list" href="__URL__/index/id-{$class_info.cid}"> 内容列表</a> </div>
    <div class="button-group float-right"> <a class="button button-small bg-dot icon-plus dropdown-toggle"> 添加内容 <span class="downward"></span></a>
      <ul class="drop-menu pull-right">
        <?php if(model('user_group')->model_power('content','add')){ ?>
        <li><a href="__URL__/add/cid-{$class_info.cid}">添加内容</a></li>
        <?php } ?>
      </ul>
    </div>
  </div>
</div>
<div class="admin-main">
  <div class="panel dux-box">
    <div class="table-tools clearfix ">
      <div class="float-left">
        <div class="form-inline">
          {include file="content/index_search"}
        </div>
      </div>
    </div>
    <div class="table-responsive">
      <table id="table" class="table table-hover ">
        <tbody>
          <tr>
            <th width="80">选择</th>
            <th width="*">编号</th>
            <th width="*">标题</th>
            <th width="*">审核</th>
            <th width="*">访问量</th>
            <th width="*">更新时间</th>
            <th width="*">顺序</th>
            <th width="150">操作</th>
          </tr>
          <!--foreach:{$list $vo}-->
          <tr id="del_{$vo['aid']}">
            <td><input name="id[]" type="checkbox" id="id[]" value="{$vo['aid']}" ></td>
            <td>{$vo.aid}</td>
            <td><span><a href="<?php echo ROOTAPP ?>/label/admin_aurl/aid-{$vo['aid']}.html" target="_blank">{$vo.title}</a>
            <!--if:{$vo['image']<>''}-->
            <a href="javascript:void(0);" rel="{$vo.image}" class="class_pic"><img align="AbsMiddle" src="__PUBLICURL__/images/ico/pic.png" width="14" height="14" alt="" /></a>
            <!--{/if}-->
            </span>
             <?php 
            if(!empty($vo['position'])){
                $str_list=model('position')->content_list($vo['position']);
                foreach ($str_list as $value) {
                    echo ' <span class="tags_span">['.$value['name'].']</span>';
                }
            }
             ?>
            <?php if($edit_power){ ?>
            &nbsp;&nbsp;<a class="quickeditor" style=" display:none" href="javascript:;" onclick="quickeditor('__APP__/content_index/edit/id-{$vo.aid}')">[快速编辑]</a>
            <?php } ?>
            </td>
            <td>
            <!--if:{$vo['status']<>0}-->
            <font color=green><b>√</b></font>
            <!--{else}-->
            <font color=red><b>×</b></font>
            <!--{/if}-->
            </td>
            <td>{$vo.views}</td>
            <td>
            {$php(echo date('Y-m-d H:i:s',$vo['updatetime']))}
            </td>
            <td><input type="input" value="{$vo.sequence}" style="width:50px;" onblur="sequence({$vo.aid},$(this).val())" /></td>
            <td>
            <?php if($edit_power){ ?>
            <a href="__URL__/edit/id-{$vo.aid}" class="button bg-blue button-small icon-pencil" title="修改"></a>
            <?php } ?>
            <?php if($del_power){ ?>
            <a class="button bg-red button-small icon-trash-o js-del" href="javascript:void(0);" onclick="del('{$vo.aid}',this)" title="删除"></a>
            <?php } ?>
            </td>
          </tr>
          <!--{/foreach}-->
        </tbody>
      </table>
    </div>
    <div class="panel-foot table-foot clearfix">
      <div class="float-left">
        <div class="form-inline">
          <div class="form-button"> <a class="button bg-blue button-small" onClick="javascript:selectall('id[]');" type="button">全选</a>
             <?php if($past_power){ ?>
          	<a class="button bg-blue button-small" onClick="javascript:audit(1);" type="submit">发布</a>
          	<?php } ?>
            <?php if($cancel_power){ ?>
          	<a class="button bg-blue button-small" onClick="javascript:audit(2);" type="submit">草稿</a>
          	<?php } ?>
            <?php if($del_power){ ?>
            <a class="button bg-blue button-small" onClick="javascript:audit(3);" type="submit">删除</a>
            <?php } ?>
            <?php if($edit_power){ ?>
            <a class="button bg-blue button-small" onClick="javascript:$('#mobile').toggle();" type="submit">移动</a> <span id="mobile" style="display:none">
            <select name="cid"  id="cid" class="input" >
              <option value="">======选择栏目======</option>
              <!--foreach:{$category_list $vo}--> 
              <option value="{$vo['cid']}"
                  <?php if($vo['type']==0 || $vo['mid']<>$model_info['mid'] || !model('user_group')->class_power($vo['cid'])){ ?>style="background-color:#ccc"  disabled="disabled" <?php } ?> 
              >
                  {$vo['cname']}
              </option>
              <!--{/foreach}-->
            </select>
            <input type="button" onClick="javascript:audit(4);" class="button_small" value="移动" />
            </span>
            <?php } ?>
          </div>
        </div>
        <br>
      </div>
      <div class="float-right">
        <div class="page_tool">
          <div class="page" >{$page}</div>
        </div>
      </div>
    </div>
  </div>
</div>
{include file="content/index_common"}